package com.xm.servlet.reception_desk.pay;

import com.xm.util.PayUtil;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 支付
 * @author 康文程
 * @date 2024-1-9 下午 12:43
 */
@WebServlet("/alipay/payment")
public class AlipayPaymentServlet extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setContentType("text/html;charset=utf-8");
        resp.getWriter().println(PayUtil.payPage(req.getParameter("price"),
                req.getParameter("orderId"),req.getParameter("accountId"),
                req.getParameter("informationId")));
    }
}
